package cqut.wys.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Hello控制器
 * @author wuyoushan@zbj.com
 * @date 2017/2/5.
 */
@Controller
public class HelloController {

    @ResponseBody
    @RequestMapping(value = "/hello")
    public String index(){
        return "Hello World";
    }

    @RequestMapping("/")
    public String index(ModelMap model){
        model.addAttribute("host","http://www.oschina.net/");
        return "index";
    }
}
